package com.ccsoft.gsms.service;

import com.ccsoft.gsms.dao.SysUserMapper;
import com.ccsoft.gsms.model.SysPermission;
import com.ccsoft.gsms.model.SysUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName:SysUserServiceImpl
 * @Description:TODO
 * @Author:chanchaw
 * @Date:2019-11-25 15:31
 * @Version:1.0
 **/
@Service
public class SysUserServiceImpl implements SysUserService {

    @Autowired
    private SysUserMapper dao;

    @Override
    public int deleteByPrimaryKey(Integer iid) {
        return dao.deleteByPrimaryKey(iid);
    }

    @Override
    public int insert(SysUser record) {
        return dao.insert(record);
    }

    @Override
    public SysUser selectByPrimaryKey(Integer iid) {
        return dao.selectByPrimaryKey(iid);
    }

    @Override
    public List<SysUser> selectAll() {
        return dao.selectAll();
    }

    @Override
    public int updateByPrimaryKey(SysUser record) {
        return dao.updateByPrimaryKey(record);
    }

    @Override
    public SysUser selectByUserId(String userId) {
        return dao.selectByUserId(userId);
    }

    @Override
    public List<SysPermission> selectPermissionsByUserId(String userId) {
        return dao.selectPermissionsByUserId(userId);
    }
}
